<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>02_DOM入门</title>
</head>
<body>
<button onclick="add()">点我变富有</button>
<hr>
<script>
    function add() {
        // 获取元素
      let imgE =document.createElement('img');

        imgE.src='img/money.jpg';
        imgE.width=200;

      let bodyE = document.querySelector('body');

      bodyE.append(imgE);
    }
</script>
</body>
</html>